#ifndef INANLREQUEST_H_
#define INANLREQUEST_H_

#include "Command.h"
#include "Protocol.h"

class CommandInAnlRequest : public Command
{
public:
	CommandInAnlRequest() : Command()
	{
		MyCommandType = InAnlRequest;
		ArgumentsLength = 1;
	}

	FailCode DoCommand()
	{
		SendAnalogInput(Arguments[0], (uint8_t)(analogRead(Arguments[0]) >> 2)); //Note: this loses the two least significant bits, without the shift, it would lose the two most significant
		return Success;
	}
};

#endif
